package com.mmp.main.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.mmp.common.util.SearchRequired;

/**
 * The persistent class for the hospital_device_ppm_detail database table.
 *
 */
@Entity
@Table(name = "hospital_device_ppm_detail")
@NamedQuery(name = "HospitalDevicePpmDetail.findAll", query = "SELECT h FROM HospitalDevicePpmDetail h")
public class HospitalDevicePpmDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Basic(optional = false)
	private Integer id;

	@ManyToOne
	@JoinColumn(name = "device_id")
	@SearchRequired(isObject = true, fields = { "id", "lookupDeviceCategory" })
	private HospitalDevice hospitalDevice;

	@Column(name = "visit_month")
	@SearchRequired
	private Integer visitMonth;

	@Column(name = "visit_year")
	@SearchRequired
	private Integer visitYear;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "visit_date")
	private Date visitDate;

	@Column(name = "visit_report_URL")
	private String visitReportUrl;

	@Column(name = "visit_cost")
	private Float visitCost;

	private String subcontractor;

	@Column(name = "delay_penalty")
	private Float delayPenalty;

	@Column(name = "absence_reason")
	private String absenceReason;

	@Column(name = "absence_report_URL")
	private String absenceReportUrl;

	@Column(name = "visit_status")
	private Integer visitStatus;

	@ManyToOne
	@JoinColumn(name = "created_by")
	private User createdBy;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_in")
	private Date createdIn;

	public HospitalDevicePpmDetail() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public HospitalDevice getHospitalDevice() {
		return hospitalDevice;
	}

	public void setHospitalDevice(HospitalDevice hospitalDevice) {
		this.hospitalDevice = hospitalDevice;
	}

	public Integer getVisitMonth() {
		return visitMonth;
	}

	public void setVisitMonth(Integer visitMonth) {
		this.visitMonth = visitMonth;
	}

	public Integer getVisitYear() {
		return visitYear;
	}

	public void setVisitYear(Integer visitYear) {
		this.visitYear = visitYear;
	}

	public Date getVisitDate() {
		return visitDate;
	}

	public void setVisitDate(Date visitDate) {
		this.visitDate = visitDate;
	}

	public String getVisitReportUrl() {
		return visitReportUrl;
	}

	public void setVisitReportUrl(String visitReportUrl) {
		this.visitReportUrl = visitReportUrl;
	}

	public Float getVisitCost() {
		return visitCost;
	}

	public void setVisitCost(Float visitCost) {
		this.visitCost = visitCost;
	}

	public String getSubcontractor() {
		return subcontractor;
	}

	public void setSubcontractor(String subcontractor) {
		this.subcontractor = subcontractor;
	}

	public Float getDelayPenalty() {
		return delayPenalty;
	}

	public void setDelayPenalty(Float delayPenalty) {
		this.delayPenalty = delayPenalty;
	}

	public String getAbsenceReason() {
		return absenceReason;
	}

	public void setAbsenceReason(String absenceReason) {
		this.absenceReason = absenceReason;
	}

	public String getAbsenceReportUrl() {
		return absenceReportUrl;
	}

	public void setAbsenceReportUrl(String absenceReportUrl) {
		this.absenceReportUrl = absenceReportUrl;
	}

	public Integer getVisitStatus() {
		return visitStatus;
	}

	public void setVisitStatus(Integer visitStatus) {
		this.visitStatus = visitStatus;
	}

	public User getCreatedBy() {
		return createdBy;
	}

	public void setCreatedBy(User createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedIn() {
		return createdIn;
	}

	public void setCreatedIn(Date createdIn) {
		this.createdIn = createdIn;
	}

}
